#pragma once 

#include <Renderable.hpp>

class TDebugRenderRay : public TRenderable
{
	Math::Ray mRay;
public:
	TDebugRenderRay(IDK::Material mtrl)
		: TRenderable(mtrl), mRay(Math::Vector3::Zero, Math::Vector3::Zero)
	{
	}

	void SetRay(const Math::Ray& ray)
	{
		mRay = ray;
	}

	virtual bool Render(IDK::IRenderState& rndState)
	{
		bool result = TRenderable::Render(rndState);

		rndState.DrawLine(mRay.Origin, mRay.Origin + (mRay.Direction * 500.0f));
		return result;
	}
};

typedef ref<TDebugRenderRay> DebugRenderRay;


class TDebugRenderHitPoint : public TRenderable
{
	Math::Vector3 mHitPoint;
public:
	TDebugRenderHitPoint(IDK::Material mtrl)
		: TRenderable(mtrl)
	{
	}

	void SetPoint(const Math::Vector3& point)
	{
		mHitPoint = point;
	}

	virtual bool Render(IDK::IRenderState& rndState)
	{
		bool result = TRenderable::Render(rndState);

		rndState.DrawLine(mHitPoint, mHitPoint + (Math::Vector3::UpY * 500.0f));
		return result;
	}
};

typedef ref<TDebugRenderHitPoint> DebugRenderHitPoint;